package tum.in.rost.pp;

import java.io.FileReader;
import java.io.IOException;
import java.io.LineNumberReader;

public class FileUtilities {

	

	public static int countLines(String filename) throws IOException {
		LineNumberReader reader = new LineNumberReader(new FileReader(filename));
		int cnt = 0;
		String lineRead = "";
		while ((lineRead = reader.readLine()) != null) {
		}
		cnt = reader.getLineNumber();
		reader.close();
		return cnt;
	}

	public static void CreateHashTableForAttributes(String fileData) {
		fileData = fileData.trim();
		String AttrbibuteList[] = org.apache.commons.lang3.StringUtils.split(fileData, InstanceDataParser.ATRIBUTE_KEY);
		for (String s : AttrbibuteList) {
			System.out.println(s);
		}
	}
	
}
